package com.qf.java2201.securitydemo1.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @date 2022/5/16
 * @desc
 */
@Controller
public class SecurityController {

    @RequestMapping("/add")
    @ResponseBody
    public String add(){
        return "hello security!";
    }



    @RequestMapping("/main")
    public String main(){
        System.out.println("main");
        return "success";
    }


    @GetMapping("/unauth")
    public String accessDenyPage(){
        return "unauth";
    }

}
